<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Component One Nav Tab</title>
    <link rel="stylesheet" href="../contents/bootstrap.min.css">
    <link rel="stylesheet" href="../contents/wijmo.min.2022.04.22.uat.css">
    <style type="text/css">
        .wj-tabpanel {
            padding: 0 12px;
        }
        .wj-tabpane {
            padding: 12px;
        }
        .wj-tabheader:hover {
            outline: 2px solid rgba(90, 160, 215, .5);
        }

        /* custom-headers */
        .wj-tabpanel.custom-headers .wj-tabpanes {
            border: none;
        }
        .wj-tabpanel.custom-headers > div > .wj-tabheaders {
            background: black;
            color: white;
            border: none;
        }
        .wj-tabpanel.custom-headers .wj-tabheaders .wj-tabheader.wj-state-active {
            background: white;
            color: black;
        }
        .wj-tabpanel.custom-headers .wj-tabheaders .wj-tabheader:not(.wj-state-active) {
            font-weight: normal;
        }
        .wj-tabpanel.custom-headers .wj-tabheaders .wj-tabheader.wj-state-active:after {
            display: none; /* hide underline */
        }

        /* tabs on the left */
        .wj-tabpanel.tabs-left > div {
            display: flex;
            align-items: center;
        }
        .wj-tabpanel.tabs-left .wj-tabheaders {
            display: flex;
            flex-direction: column;
            min-width: 8em;
            border-right: 1px solid #ddd;
        }
        .wj-tabpanel.tabs-left .wj-tabheaders .wj-tabheader {
            text-align: right;
        }
        .wj-tabpanel.tabs-left .wj-tabpanes {
            display: flex;
            flex-grow: 1;
            border-top: none;
            overflow-x: hidden;
        }

        /* tabs on the right */
        .wj-tabpanel.tabs-right > div {
            display: flex;
            align-items: center;
        }
        .wj-tabpanel.tabs-right .wj-tabheaders {
            display: flex;
            flex-direction: column;
            min-width: 8em;
            border-left: 1px solid #ddd;
            order: 1;
        }
        .wj-tabpanel.tabs-right .wj-tabheaders .wj-tabheader {
            text-align: left;
        }
        .wj-tabpanel.tabs-right .wj-tabpanes {
            display: flex;
            flex-grow: 1;
            border-top: none;
            overflow-x: hidden;
            order: 0;
        }

        /* tabs below */
        .wj-tabpanel.tabs-below > div {
            display: flex;
            flex-direction: column;
            align-items: stretch;
        }
        .wj-tabpanel.tabs-below .wj-tabheaders {
            order: 1; /* headers after panes */
        }
        .wj-tabpanel.tabs-below .wj-tabpanes {
            order: 0;
        }
        .wj-tabpanel.tabs-below .wj-tabheaders .wj-tabheader.wj-state-active:after {
            top: 0;
            bottom: unset;
        }

        label {
            width: 8em;
            text-align: right;
            margin-right: 6px;
        }
        body {
            margin-bottom: 48pt;
        }
    </style>
    <script type="text/javascript" src="../Javascripts/wijmo.min.2022.04.22.uat.js"></script>
</head>
<body>
    <div class="container-fluid">
        <div id="theTabPanel">
            <div>
                <a>Africa</a>
                <div>
                    <ul>
                        <li>Algeria</li>
                        <li>Angola</li>
                        <li>Benin</li>
                        <li>Botswana</li>
                    </ul>
                </div>
            </div>
            <div>
                <a class="wj-state-active">
                    America
                </a>
                <div>
                    <ul>
                        <li>Canada</li>
                        <li>Chile</li>
                        <li>Mexico</li>
                        <li>United States</li>
                    </ul>
                </div>
            </div>
        </div>
    </div>

    <script type="text/javascript">
        var countries = "US,Japan,China,Italy".split(',');
        function getData(){
            let data = [];
            for(let i = 0;i<20;i++){
                data.push({
                    id:i,
                    country:countries[Math.round(Math.random() * 100) % countries.length],
                    sales:Math.random() * 10000,
                    expenses:Math.random() * 5000,
                    overdue: Math.round(Math.random() * 100) % countries.length === 0
                });
            }
            return data;
        }
        document.readyState === "completed"?init():window.onload = init;

        function init(){
            let tab = new wijmo.nav.TabPanel("#theTabPanel");
            //wijmo.toggleClass(tab.hostElement, 'custom-headers', true);
        }
        // https://demo.grapecity.com.cn/wijmo/demos/Nav/TabPanel/Styling/purejs
    </script>
</body>
</html>